package top.mcwebsite.markdown.render

import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import top.mcwebsite.markdown.model.MarkdownNode
import top.mcwebsite.markdown.theme.LocalMarkdownTheme


object ParagraphRender : MarkdownComponent {

    @Composable
    override fun render(markdownNode: MarkdownNode) {
        val theme = LocalMarkdownTheme.current
        MarkdownText(
            markdownNode.content,
            markdownNode.node,
            markdownNode.state,
            theme.text,
            modifier = Modifier
                .padding(theme.blockPadding)
        )
    }

}